<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>管理中心 - 商品列表 </title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="/Public/Admin/Styles/general.css" rel="stylesheet" type="text/css" />
    <link href="/Public/Admin/Styles/main.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/Public/umeditor/third-party/jquery.min.js"></script>
</head>
<body>
<h1>
    <?php if($_page_btn_name): ?>
    <span class="action-span"><a href="<?php echo $_page_btn_link; ?>"><?php echo $_page_btn_name; ?></a></span>
    <?php endif; ?>
    <span class="action-span1"><a href="#">管理中心</a></span>
    <span id="search_id" class="action-span1"> - <?php echo $_page_title; ?> </span>
    <div style="clear:both"></div>
</h1>

<!--  内容  -->
<div class="form-div">
    <form action="/index.php/Admin/Goods/lists" method="GET" name="searchForm">
        <img src="/Public/Admin/Images/icon_search.gif" width="26" height="22" border="0" alt="search" />
        <!-- 分类 -->
        <!--<select name="cat_id">-->
            <!--<option value="0">所有分类</option>-->
            <!--<?php if(is_array($cat_list)): foreach($cat_list as $key=>$val): ?>-->
                <!--<option value="<<?php echo ($val["cat_id"]); ?>>"><<?php echo (str_repeat('&nbsp;&nbsp;',$val["lev"])); ?>><<?php echo ($val["cat_name"]); ?>></option>-->
            <!--<?php endforeach; endif; ?>-->
        <!--</select>-->
        <p>
            商品名称:
            <input type="text" name="gn" size="60" />
        </p>
        <p>
            价　　格:
            从<input value="<?php echo I('get.fp'); ?>" type="text" name="fp" size="8" />
            到<input value="<?php echo I('get.tp'); ?>" type="text" name="tp" size="8" />
        </p>
        <p>
            <!--上架 -->
            是否上架:
            <?php $ios = I('get.ios'); ?>
            <input type="radio" name="ios" value="" <?php if($ios == '') echo 'checked="checked"';?>/>全部
            <input type="radio" name="ios" value="是" <?php if($ios == '是') echo 'checked="checked"';?>/>上架
            <input type="radio" name="ios" value="否" <?php if($ios == '否') echo 'checked="checked"';?>/>下架
        </p>

        <!--排序-->
        <!--<?php $obdy = I('get.odby','id_desc'); ?>-->
        <!--<input type="radio" name="odby" value="id_desc">-->
        <!--<input type="radio" name="odby" value="id_asc">-->
        <!--<input type="radio" name="odby" value="price_desc">-->
        <!--<input type="radio" name="odby" value="price_asc">-->
        <p>
            <!--时间-->
            添加时间:
            从<input type="text" id="fa" name="fa" value="<?php echo I('get.fa'); ?>" size="20" />
            到<input type="text" id="ta" name="ta" value="<?php echo I('get.ta'); ?>" size="20" />
        </p>

        <input type="submit" value=" 搜索 " class="button" />
    </form>
</div>



<!-- 商品列表 -->
<form method="post" action="" name="listForm" onsubmit="">
    <div class="list-div" id="listDiv">
        <table cellpadding="3" cellspacing="1">
            <tr>
                <th>编号</th>
                <th>主分类</th>
                <th>品牌</th>
                <th>商品名称</th>
                <th>价格</th>
                <th>是否上架</th>
                <th>添加时间</th>
                <th>操作</th>
            </tr>
            <?php if(is_array($list)): foreach($list as $key=>$val): ?><tr>
                    <td align="center"><?php echo ($val["id"]); ?></td>
                    <td align="center"><?php echo $v['cat_name']; ?></td>
                    <td align="center"><?php echo $v['brand_name']; ?></td>
                    <td align="center" class="first-cell"><span><?php echo ($val["goods_name"]); ?></span></td>
                    <td align="center"><span><?php echo ($val["shop_price"]); ?></span></td>
                    <td align="center"><img src="<?php if(($val["is_onsale"] == 1)): ?>/Public/Admin/Images/yes.gif <?php else: ?> /Public/Admin/Images/no.gif<?php endif; ?>"/></td>
                    <td align="center"><?php echo $v['addtime']; ?></td>
                    <td align="center">
                        <a href="<?php echo U('edit?id='.$val['id']); ?>" title="编辑">编辑</a>
                        <a onclick="return confirm('确定要删除吗？');" href="<?php echo U('delete?id='.$val['id']); ?>" onclick="" title="删除">删除</a>
                    </td>
                </tr><?php endforeach; endif; ?>
        </table>

        <!-- 分页开始 -->
        <table id="page-table" cellspacing="0">
            <tr>
                <td width="80%">&nbsp;</td>
                <td align="center" nowrap="true">
                    <?php echo ($page); ?>
                </td>
            </tr>
        </table>
        <!-- 分页结束 -->
    </div>
</form>

<link href="/Public/datetimepicker/jquery-ui-1.9.2.custom.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" charset="utf-8" src="/Public/datetimepicker/jquery-ui-1.9.2.custom.min.js"></script>
<script type="text/javascript" charset="utf-8" src="/Public/datetimepicker/datepicker-zh_cn.js"></script>
<link rel="stylesheet" media="all" type="text/css" href="/Public/datetimepicker/time/jquery-ui-timepicker-addon.min.css" />
<script type="text/javascript" src="/Public/datetimepicker/time/jquery-ui-timepicker-addon.min.js"></script>
<script type="text/javascript" src="/Public/datetimepicker/time/i18n/jquery-ui-timepicker-addon-i18n.min.js"></script>
<script>
    // 添加时间插件
    $.timepicker.setDefaults($.timepicker.regional['zh-CN']);  // 设置使用中文

    $("#fa").datetimepicker();
    $("#ta").datetimepicker();
</script>
<!-- 引入行高亮显示 -->
<script type="text/javascript" src="/Public/Admin/Js/tron.js"></script>

<div id="footer">
    共执行 7 个查询，用时 0.028849 秒，Gzip 已禁用，内存占用 3.219 MB<br />
    版权所有 &copy; 2005-2012 上海商派网络科技有限公司，并保留所有权利。
</div>
</body>
</html>